<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="GeneralpackageCreateDlg" widgetVar="GeneralpackageCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreateGeneralpackageTitle}" closeOnEscape="true">

            <h:form id="GeneralpackageCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2">

                        <p:outputLabel value="#{bundle.CreateGeneralpackageLabel_GPackageId}" for="GPackageId" />
                        <p:inputText id="GPackageId" value="#{generalpackageController.selected.GPackageId}" title="#{bundle.CreateGeneralpackageTitle_GPackageId}" required="true" requiredMessage="#{bundle.CreateGeneralpackageRequiredMessage_GPackageId}"/>

                        <p:outputLabel value="#{bundle.CreateGeneralpackageLabel_price}" for="price" />
                        <p:inputText id="price" value="#{generalpackageController.selected.price}" title="#{bundle.CreateGeneralpackageTitle_price}"/>

                        <p:outputLabel value="#{bundle.CreateGeneralpackageLabel_dateCreated}" for="dateCreated" />
                        <p:calendar id="dateCreated" pattern="MM/dd/yyyy" value="#{generalpackageController.selected.dateCreated}" title="#{bundle.EditGeneralpackageTitle_dateCreated}"  showOn="button"/>

                        <p:outputLabel value="#{bundle.CreateGeneralpackageLabel_userId}" for="userId" />
                        <p:selectOneMenu id="userId" value="#{generalpackageController.selected.userId}" required="true" requiredMessage="#{bundle.EditGeneralpackageRequiredMessage_userId}" converter="userConverter">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{userController.items}"
                                           var="userIdItem"
                                           itemValue="#{userIdItem}"
                                           itemLabel="#{userIdItem.userId.toString()}"
                                           />

                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{generalpackageController.saveNew}" value="#{bundle.Save}" update="display,:GeneralpackageListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,GeneralpackageCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="GeneralpackageCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
